package com.twu.biblioteca;

/**
 * Created with IntelliJ IDEA.
 * User: aulme
 * Date: 28/06/2013
 * Time: 09:53
 * To change this template use File | Settings | File Templates.
 */
public class Menu {
    private UserInterface userInterface;
    private MenuOptions options;

    public Menu(UserInterface userInterface, MenuOptions options) {
        this.options = options;
        this.userInterface = userInterface;
    }

    public void Execute() {
        this.options.showOptions();
        int selectedOption = this.userInterface.getOptionInput();
        this.options.invokeOption(selectedOption);
    }
}
